exports.port = 3000;
exports.site_name = "高尔夫网站";

var db_options = {
	host:'localhost',
	port:3306,
	user:'root',
	password:'',
	database:'test'
};

var mysql = new require('mysql'), db = null;
if(mysql.createClient) {
    db = mysql.createClient(db_options);
	//console.info(db);
} else {
    db = new mysql.Client(db_options);
    db.connect(function(err) {
        if(err) {
            console.error('connect db ' + db.host + ' error: ' + err);
            process.exit();
        }
    });
}
exports.db = db;